<!DOCTYPE HTML>
<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="Cache-Control" content="no-siteapp" />

    <![endif]-->
    <title>审核助理审核</title>
</head>
<body>
<div class="contant">
<div class="row">
    <div class="content complete_info">
        <include file="Public/applyInfo" />
        <div role="tabpanel" class="tab-pane box" id="ggg">
            <table style="width: 80%;margin-left: 50px;margin-top: 30px" class="table table-hover table-bordered">
                <div  style='margin-left: 50px;'>
                    <th>岗位职员</th>
                    <th>审核结果</th>
                    <th>审核意见</th>
                    <th>备注</th>
                    <th>审核人</th>
                    <th>审核时间</th>
                    <volist name='check_log' id='log'>
                        <tr>
                            <td>
                                <switch name='log.check_status'>
                                    <case value='1'>渠道内勤审核</case>
                                    <case value='2'>区域经理审核</case>
                                    <case value='3'>审核助理审核</case>
                                    <case value='4'>审核专员审核</case>
                                    <case value='5'>审核主管审核</case>
                                    <case value='6'>审核经理审核</case>
                                </switch>
                            </td>
                            <td>
                                <switch name='log.status'>
                                    <case value='1'>通过</case>
                                    <case value='11'>待定</case>
                                    <case value='12'>退回</case>
                                </switch>
                            </td>
                            <td>
                                {$log.opinion}
                            </td>

                            <td>
                                {$log.note}
                            </td>

                            <td>
                                {$log.admin_name}
                            </td>

                            <td>
                                {$log.add_time|date='Y-m-d H:i:s',###}
                            </td>
                        </tr>
                    </volist>
                </div>
            </table>
            <h2>审核助理审核</h2>
            <form action="{:U('Check/add_CheckInfo')}" method='post'>
                <div class="list-block" style='margin-left: 3%;'>
                    <div class="row">
                        <div class="item col-33 ">
                            <label>审核结果:</label>
                            <select class="form-control" name="Cstatus" id="user_select">
                                <option value="1">通过</option>
                                <option value="11">待定</option>
                                <option value="12">驳回</option>
                                <!--<option value="0">拒贷</option>-->
                            </select>
                        </div>
                    </div>
                    <!--审核通过模块-->
                    <div id='check_detail'>
                        <div class="row">
                            <label>审核意见:</label>
                            <textarea name="opinion" id="" style="width:400px;" cols="60" rows="5"></textarea>
                        </div>
                        <div class="row ">
                            <label>备注:</label>
                            <input type="text" style="width:400px;" class='form-control' name="note">
                        </div>
                        <div class="row">
                            <label>附加查询:</label>
                            <a href="https://www.che300.com/" target="_blank" class="btn btn-primary">车300评估</a>
                            <a target="__blank" class="btn btn-danger"
                               href="http://www.122.gov.cn/m/map/select">驾照查询</a>
                        </div>
                    </div>
                    <div class="row">
                        <label></label>
                        <input type="hidden" id="user_id" name="user_id" value="{$info.id}">
                        <input type="hidden" name="check_status" value="3">
                        <input type="submit" class="button01" value="提交" name="">
                        <input type="button" class="button01" value="释放" id='cancel' name="">
                    </div>
                </div>
            </form>

        </div>
    </div>
</div>
</div>
<!--<script src="__JS__/distpicker.data.js"></script>
<script src="__JS__/distpicker.js"></script>-->
    <script type="text/javascript">
        $('.checkin').click(function () {
            obj = $(this), id = obj.data('id');
            var html = '';
            $.post('{:U("Apply/check_info")}', {id: id}, function (data) {

                html = '<p class="col-sm-6">审核人：' + data.admin_name + '</p>';
                html += '<p class="col-sm-6">身份：' + data.type + '</p>';
                if (data.status == 0) {
                    html += '<p class="col-sm-6">未通过类型：' + data.refuse_name + '</p>';
                    html += '<p class="col-sm-6">未通过原因：' + data.refuse_reason + '</p>';
                } else {
                    html += '<p class="col-sm-6">通过意见：' + data.opinion + '</p>';
                    html += '<p class="col-sm-6">通过备注：' + data.note + '</p>';
                }
                $('.modal-body').html(html);
                $('#myModal').show();
                // $('#myModal').modal('show');
            });
        });

        $(".close").click(function () {
            $('#myModal').hide();
        });
        $('#cancel').click(function () {
            var user_id=$("#user_id").val();
//            alert(user_id);
            $.post('{:U("Index/cancel_status")}', {id: user_id}, function (data) {
                if (data.status == 1) {
                    location.href = '{:U("Check/assistant")}';
                } else {
                    alert(data.info);
                    window.history.back();
                }
            });
        });

        $('#user_select').change(function () {
            var Cstatus = $("select[name='Cstatus']").val();
            if (Cstatus == 0) {
                $('#refuse').css('display', 'block');
            } else {
                $('#refuse').css('display', 'none');
            }

        });

    </script>
</body>
</html>
